package event

import ext.byteArg

class GoodsTypeQueryResultEvent(val row: Int, val count: Int) {
    companion object {
        fun withByteArray(byteArray: ByteArray): GoodsTypeQueryResultEvent {
            val row = byteArray.byteArg(1)
            val col = byteArray.byteArg(2)
            return GoodsTypeQueryResultEvent(row, col)
        }
    }

    fun isFinish() = (row == 0) && (count == 0)
}